<?php

namespace app\purchase\controller;
use app\common\controller\PCBase;
use app\common\controller\DBase;
use app\purchase\logic\PurchaseOrderLogic;
use app\api\logic\Vip1688Logic;
use  think\App;
class PurchaseOrder extends PCBase
{


    /**
     * @desc   获取采购订单列表接口
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function index(){
        $params             = $this->request->post();
        return  (new PurchaseOrderLogic())->index($params);
    }



    /**
     * @desc   获取采购人员
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function getPurchaser(){
        $params             = $this->request->post();
        $admin_id           = $this->getAdminId();
        $params['admin_id'] = $admin_id;
        return  (new PurchaseOrderLogic())->getPurchaser($params);
    }


    /**
     * @desc   获取采购人员
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function getPurchaserList(){
        $params             = $this->request->post();
        $keyword            = $params['keyword']??'';
        $params['username'] = $keyword;
        return  (new PurchaseOrderLogic())->getPurchaserList($params);
    }



    /**
     * @desc   草稿箱创建线下采购单
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function add_purchase_down(){
        $params             = $this->request->post();
        return  (new PurchaseOrderLogic())->add_purchase_down($params);
    }

    /**
     * @desc   草稿箱创建线下采购单编辑
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function edit_purchase_down(){
        $params             = $this->request->post();
        return  (new PurchaseOrderLogic())->edit_purchase_down($params);
    }



    /**
     * @desc   线下采购单编辑获取详情
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function get_purchase_down(){
        $params             = $this->request->post();
        return  (new PurchaseOrderLogic())->get_purchase_down($params);
    }


    /**
     * @desc   线下采购列表接口
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function getDownPurchase(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->getDownPurchase($params);
    }


    /**
     * @desc   线下采购列表详情接口
     * @author luckyXiong
     * @date   2024-12-21
     */
    public function getDownPurchaseDetail(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->getDownPurchaseDetail($params);
    }


    /**
     * @desc   线下采购提交审核接口
     * @author luckyXiong
     * @date   2025-01-06
     */
    public function submitDownPurchase(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->submitDownPurchase($params);
    }




    /**
     * @desc   编辑运单号接口
     * @author luckyXiong
     * @date   2024-12-23
     */
    public function edit_track_number(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->edit_track_number($params);
    }


    /**
     * @desc   获取物流商信息列表接口
     * @author luckyXiong
     * @date   2024-12-23
     */
    public function get_track_list(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->get_track_list($params);
    }


    /**
     * @desc   获取1688支付账号接口
     * @author luckyXiong
     * @date   2024-12-23
     */
    public function get_1688_account(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->get_1688_account($params);
    }


    /**
     * @desc   待审核通过审核接口
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function pass_check(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->pass_check($params);
    }


    /**
     * @desc   待审核驳回审核接口
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function pass_reject(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->pass_reject($params);
    }


    /**
     * @desc   添加采购备注
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function add_remark(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->add_remark($params);
    }


    /**
     * @desc   取消采购单接口
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function cancel_purchase(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->cancel_purchase($params);
    }


    /**
     * @desc   终止部分到货接口
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function end_purchase(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->end_purchase($params);
    }



    /**
     * @desc   获取待入库的基础信息
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function purchase_insert_info(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->purchase_insert_info($params);
    }

    /**
     * @desc   获取待入库的基础信息
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function purchase_change_info(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->purchase_change_info($params);
    }

    /**
     * @desc   采购变更提交
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function purchase_change_edit(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->purchase_change_edit($params);
    }


    /**
     * @desc   采购变更提交通过
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function purchase_change_pass(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->purchase_change_pass($params);
    }


    /**
     * @desc   待到货签收入库接口
     * @author luckyXiong
     * @date   2025-01-08
     */
    public function purchase_insert(){
        $params  = $this->request->post();
        return  (new PurchaseOrderLogic())->purchase_insert($params);
    }


    /**
     * @desc   采购列表下单接口
     * @author luckyXiong
     * @date   2025-03-27
     */
    public function submit_1688_order(){
        $params  = $this->request->post();
        return  (new Vip1688Logic())->submit_1688_order($params);
    }





















}